package meiyunting.shiwuzhaoling.service;

import meiyunting.shiwuzhaoling.model.Claim;
import meiyunting.shiwuzhaoling.model.ClaimStatus;
import meiyunting.shiwuzhaoling.model.ClaimType;
import meiyunting.shiwuzhaoling.model.Item;
import meiyunting.shiwuzhaoling.model.User;

import java.util.List;

public interface ClaimService {
    Claim createClaim(Item item, User claimer, String description);
    
    /**
     * 创建认领请求，支持认领类型和图片
     * 
     * @param item 物品
     * @param claimer 认领者
     * @param description 描述
     * @param claimType 认领类型
     * @param imagePath 图片路径
     * @return 创建的认领请求
     */
    Claim createClaim(Item item, User claimer, String description, ClaimType claimType, String imagePath);
    
    List<Claim> getClaimsByItem(Item item);
    List<Claim> getClaimsByUser(User user);
    Claim getClaimById(Long id);
    Claim updateClaimStatus(Long id, ClaimStatus status);
    Claim approveClaimAndCompleteItem(Long id);
    boolean hasUserClaimedItem(Item item, User user);
} 